package com.forlgb.powercloud.authorization.endpoint;

import com.forlgb.powercloud.authorization.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AuthEndpoint {
    @Autowired
    private AuthService authService;

    /**
     * 登录, 已测试
     *
     * @param username
     * @param password
     * @return
     */
    @RequestMapping(
            value = {"/user/loginPwd"},
            method = {RequestMethod.POST}
    )
    public String login(String username, String password) {
        return authService.login(username, password);
    }
}
